import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'app-message',
  templateUrl: './message.component.html',
  styleUrls: ['./message.component.scss']
})
export class MessageComponent implements OnInit {

  constructor(
    private router: Router
  ) { }

  ngOnInit(): void {
    this.loadData(1);
  }
  data: any[] = [];
  loadData(pi: number): void {
    this.data = new Array(5).fill({}).map((_, index) => ({
      href: '',
      title: `小口径报装自来水业务受理状态变更 ${index} (page: ${pi})`,
      avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
      description: '该单据目前状态为 待受理，请前往我的——工单查询处查看。',
      content:
        'We supply a series of design principles, practical patterns and high quality design resources ' +
        '(Sketch and Axure), to help people create their product prototypes beautifully and efficiently.'
    }));
  }

  goDetail(item: any){
    this.router.navigate(['/me/message/detail'])
  }

}
